<template>
    <div class="template-app blues-wrap" :class="[$route.path!=='/login'&& $route.path!=='/Macip'&& $route.path!=='/Evaluate'&& $route.path!=='/ad'?'wrapper':'']">
        <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation" v-if="$route.path!=='/login'&& $route.path!=='/Macip'&& $route.path!=='/Evaluate'&& $route.path!=='/ad'">
            <site-menu></site-menu>
            <site-header></site-header>
            <ui></ui>
            <perfect></perfect>
        </nav>
        <div :class="$route.path!=='/login'&& $route.path!=='/Evaluate'&& $route.path!=='/Macip'&& $route.path!=='/ad'?'page-wrapper':''">
            <router-view></router-view>
        </div>
    </div>
</template>

<script>
    import SiteHeader from "./common/SiteHeader";
    import SiteMenu from "./common/SiteMenu";
    import Perfect from "./common/Perfect";
    import Ui from "./common/Ui";
    import {
        popPerfect
    } from "../vuex/getters";
    import {
        setpopPerfect,
        setUserInfo
    } from "../vuex/actions";

    export default {
        data() {
            return {
                parentTest: 100
            };
        },
        vuex: {
            getters: {
                popPerfect
            },
            actions: {
                setpopPerfect,
                setUserInfo
            }
        },
        components: {
            Ui,
            Perfect,
            SiteHeader,
            SiteMenu
        },
        computed: {},
        methods: {},
        created() {
            let me = this;
            let user = sessionStorage.getItem("user");
            if (user) {
                me.setUserInfo(JSON.parse(user));
            } else {
                me.setUserInfo({})
            }
        },
        mounted() {
            let me = this;
        },
        updated() {
            let me = this;
        },
        beforeDestory() {
            let me = this;
        }
    };
</script>